import store from '@/store'

const paymentMethod = [
  { label: '余额', value: 0 },
  { label: '微信', value: 1 },
  { label: '支付宝', value: 2 }
]
const serviceMethod = [
  { label: '送货上门', value: 0 },
  { label: '自提点自取', value: 1 },
  { label: '其他', value: 2 }
]
const payStatus = [
  { label: '未收款', value: 0 },
  { label: '已收款', value: 1 }
]

export const formBase = [
  {
    label: "会员昵称",
    type: "input",
    field: "userName"
  },
  {
    label: "付款方式",
    type: 'select',
    field: 'paymentMethod',
    optionsKey: "label",
    optionsValue: "value",
    options: paymentMethod,
  },
  {
    label: "目的地区",
    type: "select",
    field: "destinationId",
    optionsKey: "destinationName",
    optionsValue: "id",
    options: store.state.custom_dict.destination,
  },
  {
    label: "超体积费",
    type: "select",
    field: "warehouseId",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '无', value: 0 },
      { label: '有', value: 1 },
    ],
  },
  {
    label: "会员ID",
    type: "input",
    field: "userId"
  },
  {
    label: "服务方式",
    type: "select",
    field: "serviceMethod",
    optionsKey: "label",
    optionsValue: "value",
    options: serviceMethod
  },
  {
    label: "地址附加费",
    type: "select",
    field: "addressAdditionalFee",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '无附加费', value: 0 },
      { label: '有附加费', value: 1 }
    ],
  },
  {
    label: "承运商",
    type: "select",
    field: "carrierId",
    optionsKey: "carrierName",
    optionsValue: "id",
    options: store.state.custom_dict.carrier
  },
  {
    label: "拣货",
    type: "select",
    field: "pickedOut",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '未拣货', value: 0 },
      { label: '已拣货', value: 1 }
    ],
  },
  {
    label: "签收",
    type: "select",
    field: "isSign",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '未签收', value: 0 },
      { label: '已签收', value: 1 }
    ],
  },
  {
    label: "收款",
    type: "select",
    field: "payStatus",
    optionsKey: "label",
    optionsValue: "value",
    options: payStatus,
  },
  {
    label: "审核",
    type: "select",
    field: "isChecked",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '未审核', value: 0 },
      { label: '已审核', value: 1 }
    ],
  },
  {
    label: "类型",
    type: "select",
    field: "source",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '在线下单', value: 0 },
      { label: '后台下单', value: 1 },
      { label: '同行导入', value: 2 },
      { label: 'APP端', value: 3 },
      { label: '公众号下单', value: 4 }
    ],
  },
  {
    label: "打单",
    type: "select",
    field: "printStatus",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '未打单', value: 0 },
      { label: '已打单', value: 1 }
    ],
  },
  {
    label: "核重",
    type: "select",
    field: "isCheckWeight",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '未核重', value: 0 },
      { label: '已核重', value: 1 }
    ],
  },
  {
    label: "店铺",
    type: "select",
    field: "shopId",
    optionsKey: "shopName",
    optionsValue: "id",
    options: store.state.custom_dict.shop
  },
  {
    label: "时效",
    type: "select",
    field: "flightEffectivenessId",
    optionsKey: "name",
    optionsValue: "id",
    options: store.state.custom_dict.timely
  },
  {
    label: "包税",
    type: "select",
    field: "isTax",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '未包税', value: 0 },
      { label: '已包税', value: 1 }
    ],
  },
  {
    label: "发货",
    type: "select",
    field: "transferStatus",
    optionsKey: "label",
    optionsValue: "value",
    options: [
      { label: '未发货', value: 0 },
      { label: '已发货', value: 1 }
    ],
  },
];

export const itemStyle = {
  margin: 0,
  padding: '0 0 0 10px'
}

export const tableFormStyle = {

}

export const headerCellStyle = {
  fontSize: '14px',
  fontWeight: '100',
  background: 'white',
  borderTop: '1px solid #F1F1F1',
  textAlign: 'center'
}

export const cellStyle = {
  textAlign: 'center'
}

export const tableBase = [
  {
    label: "付款码",
    prop: "paymentCode",
    operate: {
      type: "input",
      field: "paymentCode"
    }
  },
  {
    label: "ID",
    prop: "orderId",
    width: "50"
  },
  {
    label: "备注",
    prop: "remark",
    width: "150",
    operate: {
      type: "input",
      field: "remark"
    },
  },
  {
    label: "品名",
    prop: "cargoName",
    width: "150",
    operate: {
      type: "input",
      field: "cargoName"
    },
  },
  {
    label: "收款",
    prop: "payStatus",
    width: "150",
    slotName: 'payStatus'
  },
  {
    label: "打单",
    prop: "printStatus",
    width: "150",
    echo: {
      field: "printStatus",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未打单', value: 0 },
        { label: '已打单', value: 1 }
      ],
    }
  },
  {
    label: "打拣货单",
    prop: "printPackNumber",
    width: "150",
    echo: {
      field: "printPackNumber",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未打拣货单', value: 0 },
        { label: '已打拣货单', value: 1 }
      ],
    }
  },
  {
    label: "转运单号",
    prop: "transferOrderNumber",
    width: "150"
  },
  {
    label: "件数",
    prop: "packageCount"
  },
  {
    label: "包数",
    prop: "bagCount"
  },
  {
    label: "订单日期",
    prop: "createTime"
  },
  {
    label: "到货时间",
    prop: "arrivalTime"
  },
  {
    label: "会员名称",
    prop: "userName"
  },
  {
    label: "会员ID",
    prop: "userId"
  },
  {
    label: "余额",
    prop: "balance"
  },
  {
    label: "会员等级",
    prop: "userLevel"
  },
  {
    label: "所属店铺",
    prop: "ownedStoreName"
  },
  {
    label: "下单店铺",
    prop: "orderStoreName"
  },
  {
    label: "实重",
    prop: "actualWeight"
  },
  {
    label: "体积重",
    prop: "volumeWeight"
  },
  {
    label: "计费重量",
    prop: "chargingWeight"
  },
  {
    label: "应收费用",
    prop: "dueFee"
  },
  {
    label: "积分",
    prop: "points"
  },
  {
    label: "使用集运劵",
    prop: "useCouponAmount"
  },
  {
    label: "仓库",
    prop: "warehouseName"
  },
  {
    label: "服务方式",
    prop: "serviceMethod",
    echo: {
      field: "serviceMethod",
      optionsKey: "label",
      optionsValue: "value",
      options: serviceMethod
    },
    operate: {
      type: 'select',
      field: 'serviceMethod',
      optionsKey: "label",
      optionsValue: "value",
      options: serviceMethod
    }
  },
  {
    label: "付款方式",
    prop: "paymentMethod",
    echo: {
      field: "paymentMethod",
      optionsKey: "label",
      optionsValue: "value",
      options: paymentMethod,
    },
    operate: {
      type: 'select',
      field: 'paymentMethod',
      optionsKey: "label",
      optionsValue: "value",
      options: paymentMethod,
    }
  },
  {
    label: "淘宝支付订单ID",
    prop: "taobaoPaymentOrderId"
  },
  {
    label: "目的地",
    prop: "destinationName"
  },
  {
    label: "收货人",
    prop: "recipient",
    operate: {
      type: 'input',
      field: 'recipient'
    }
  },
  {
    label: "手机",
    prop: "mobilePhone",
    operate: {
      type: 'input',
      field: 'mobilePhone'
    }
  },
  {
    label: "电话",
    prop: "phone",
    operate: {
      type: 'input',
      field: 'phone'
    }
  },
  {
    label: "收货地址",
    prop: "address",
    operate: {
      type: 'input',
      field: 'address'
    }
  },
  {
    label: "打单时间",
    prop: "printTime",
    operate: {
      type: "datePicker",
      field: "printTime",
      otherOption: {
        valueFormat: 'yyyy-MM-dd HH:mm:ss'
      },
      disabled: false,
    },
  },
  {
    label: "拣货",
    prop: "pickedOut",
    width: "150",
    echo: {
      field: "pickedOut",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未拣货', value: 0 },
        { label: '已拣货', value: 1 }
      ],
    }
  },
  {
    label: "拣货时间",
    prop: "pickingTime"
  },
  {
    label: "拣货人",
    prop: "picker"
  },
  {
    label: "是否发货",
    prop: "transferStatus",
    width: "150",
    echo: {
      field: "transferStatus",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未发货', value: 0 },
        { label: '已发货', value: 1 }
      ],
    }
  },
  {
    label: "发货时间",
    prop: "deliveryTime"
  },
  {
    label: "发货人",
    prop: "deliveryName"
  },
  {
    label: "签收时间",
    prop: "signingTime"
  },
  {
    label: "签收",
    prop: "isSign",
    echo: {
      field: "isSign",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未签收', value: 0 },
        { label: '已签收', value: 1 }
      ],
    }
  },
  {
    label: "到付手续费",
    prop: "pickupServiceFee"
  },
  {
    label: "来源",
    prop: "source",
    echo: {
      field: "source",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '在线下单', value: 0 },
        { label: '后台下单', value: 1 },
        { label: '同行导出', value: 2 },
        { label: 'APP端', value: 3 },
        { label: '公众号下单', value: 4 }
      ],
    }
  },
  {
    label: "收款人",
    prop: "recipientName"
  },
  {
    label: "收款时间",
    prop: "recipientTime"
  },
  {
    label: "航空包",
    prop: "aircraftPackage",
    echo: {
      field: "aircraftPackage",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未航空包', value: 0 },
        { label: '已航空包', value: 1 }
      ],
    },
    operate: {
      type: 'select',
      field: 'aircraftPackage',
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未航空包', value: 0 },
        { label: '已航空包', value: 1 }
      ]
    }
  },
  {
    label: "核重",
    prop: "isCheckWeight",
    echo: {
      field: "isCheckWeight",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未核重', value: 0 },
        { label: '已核重', value: 1 }
      ],
    },
    operate: {
      type: 'select',
      field: 'isCheckWeight',
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未核重', value: 0 },
        { label: '已核重', value: 1 }
      ]
    }
  },
  {
    label: "承运商",
    prop: "carrierCompany"
  },
  {
    label: "代收货款",
    prop: "commissionedGoods"
  },
  {
    label: "航班时效",
    prop: "flightEffectiveness"
  },
  {
    label: "航班时效2",
    prop: "flightEffectiveness2"
  },
  {
    label: "后台下单备注",
    prop: "orderRemark",
    operate: {
      type: 'input',
      field: 'orderRemark'
    }
  },
  {
    label: "统编",
    prop: "emsCode"
  },
  {
    label: "包税",
    prop: "isTax",
    echo: {
      field: "isTax",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未包税', value: 0 },
        { label: '已包税', value: 1 }
      ],
    },
    operate: {
      field: 'isTax',
      type: 'select',
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未包税', value: 0 },
        { label: '已包税', value: 1 }
      ]
    }
  },
  {
    label: "包税费用",
    prop: "taxFee",
    operate: {
      type: 'input',
      field: 'taxFee'
    }
  },
  {
    label: "平均单价",
    prop: "averageUnitPrice",
    operate: {
      type: 'input',
      field: 'averageUnitPrice'
    }
  },
  {
    label: "目的金额",
    prop: "destinationCountryAmount",
    operate: {
      type: 'input',
      field: 'destinationCountryAmount'
    }
  },
  {
    label: "超长费",
    prop: "extraFee",
    operate: {
      type: 'input',
      field: 'extraFee'
    }
  },
  {
    label: "垫付费用",
    prop: "advancePaymentFee",
    operate: {
      type: 'input',
      field: 'advancePaymentFee'
    }
  },
  {
    label: "积分费用",
    prop: "pointsFee",
    operate: {
      type: 'input',
      field: 'pointsFee'
    }
  },
  {
    label: "保价金额",
    prop: "insuranceAmount",
    operate: {
      type: 'input',
      field: 'insuranceAmount'
    }
  },
  {
    label: "保价手续费",
    prop: "insuranceServiceFee",
    operate: {
      type: 'input',
      field: 'insuranceServiceFee'
    }
  },
  {
    label: "货款手续费",
    prop: "paymentServiceFee",
    operate: {
      type: 'input',
      field: 'paymentServiceFee'
    }
  },
  {
    label: "代收金额",
    prop: "collectionAmount",
    operate: {
      type: 'input',
      field: 'collectionAmount'
    }
  },
  {
    label: "审单人",
    prop: "checkerName",
    operate: {
      type: 'input',
      field: 'checkerName'
    }
  },
  {
    label: "审单时间",
    prop: "checkingTime",
    operate: {
      type: 'input',
      field: 'checkingTime'
    }
  },
  {
    label: "是否审单",
    prop: "isChecked",
    echo: {
      field: "isChecked",
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未审单', value: 0 },
        { label: '已审单', value: 1 }
      ],
    },
    operate: {
      type: 'select',
      field: 'isChecked',
      optionsKey: "label",
      optionsValue: "value",
      options: [
        { label: '未审单', value: 0 },
        { label: '已审单', value: 1 }
      ],
    }
  },
  {
    label: "货物类型",
    prop: "cargoType"
  },
  {
    label: "其他附加费人民币",
    prop: "otherAdditionalFeeRmb"
  },
  {
    label: "包装类型",
    prop: "packagingType"
  },
  {
    label: "客服",
    prop: "customerService"
  },
  {
    label: "自提点名称",
    prop: "pickupPointName"
  },
  {
    label: "立方数",
    prop: "cubicVolume"
  },
  {
    label: "业务员",
    prop: "salesman"
  },
  {
    label: "其他附加费",
    prop: "otherAdditionalFee"
  },
  {
    label: "城市",
    prop: "city"
  },
  {
    label: "地区",
    prop: "area"
  },
  {
    label: "顺丰单号",
    prop: "sfNumber"
  },
  {
    label: "顺丰子单",
    prop: "sfSeedNumber"
  },
  {
    label: "超级店铺名称",
    prop: "superShopName"
  },
  {
    label: "超级店铺id",
    prop: "superShopId"
  },
  {
    label: "派件员工",
    prop: "sendName"
  }
]
